]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
lint: Enforce "no-unused-vars" for catch statements
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 1 Apr 2025 14:30:54 +0000 (16:30 +0200)
committerMarge Bot <marge-bot@gnome.org>
Sun, 13 Apr 2025 12:01:40 +0000 (12:01 +0000)
Now that we treat unused catch bindings as unused variables,
update the eslint rule to enforce it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3684>

lint/eslintrc-shell.yml

index 155474b74b7008956b7ded7af251bcbb58f1ff8e..150741dc4fe22f5816aa0b3d59221d8566466ed1 100644 (file)
@@ -12,6 +12,12 @@ rules:
     - mode: minimum
       beforeColon: false
       afterColon: true
+  no-unused-vars:
+    - error
+    # Vars use a suffix _ instead of a prefix because of file-scope private vars
+    - varsIgnorePattern: (^unused|_$)
+      argsIgnorePattern: ^(unused|_)
+      caughtErrors: all
   prefer-arrow-callback: error
   jsdoc/require-param-description: off
   jsdoc/require-jsdoc: